<template>
<div class="maskLayer">
    <div class="popover">
        <h3 class="popover_title">
            {{title}}
        </h3>
        <div class="popover_choose">
            <span @click="yes">确认</span>
            <span @click="no">取消</span>
        </div>
    </div>
</div>


</template>

<script>
export default {
    name: "Popover",
    props:['title'],
    data(){
        return{

        }
    },
    methods:{
        yes(){
            this.$emit("outcome",true)
        },
        no(){
            this.$emit("outcome",false)
        }
    }
}
</script>

<style scoped>
.maskLayer{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
}
.popover{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 15vw;
    min-width: 180px;
    aspect-ratio: 16/9;
    border-radius: 3px;
    background: rgba(255, 255, 255,.6);
    box-shadow: 1px 1px 5px 2px rgba(171, 167, 167, 0.6);
}
.popover_title{
    display: flex;
    width: 90%;
    text-indent: 0.5rem;
    justify-content: center;
    align-items: center;
    border: 0;
    font-size: 0.9vw;
    min-font-size: 15px;
    text-overflow: ellipsis;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 10px 0;
}
.popover_choose{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.popover_choose span{
    width: 3vw;
    height: 4vh;
    min-width: 50px;
    min-height: 20px;
    cursor: pointer;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8vw;
    min-font-size: 15px;
    border-radius: 5px;
}
.popover_choose span:hover{
    opacity: .9;
}
.popover_choose span:first-child{
    background: #68c070;
    margin-right: 30px;
}
.popover_choose span:nth-child(2){
    background: #e83a1c;
}
</style>